package com.superteam.mac.web.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.superteam.mac.base.web.action.BaseAction;
import com.superteam.mac.mode.AlarmRec;

public class AlarmRecAction extends BaseAction {

	public ActionForward findAllAlarmRec(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		String workshop = (String)request.getSession().getAttribute("real_line_cur_workshop");
		
		String machine = (String)request.getSession().getAttribute("real_line_cur_machine");
		List<AlarmRec> alarms = this.getAlarmRecDAO().findAllIndexConfig(workshop, machine, null, null);
			
			request.setAttribute("alarms", alarms);
			return mapping.findForward("alarm_right");
	}

}
